<!DOCTYPE html>
<html ng-app="appVersionApp" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <header th:replace="importCommon"></header>
    <header th:replace="importDate"></header>
    <script th:src="@{/js/system/controller/app-version-ctrl.js}"></script>
    <script th:src="@{/js/system/service/app-version-service.js}"></script>
    <script th:src="@{/js/system/filter/app-version-filter.js}"></script>
    <title>应用版本管理</title>
</head>
<body ng-controller="appVersionCtrl">
<div id="container"></div>
<div class="page-content">
    <div class="commonManager">
        <form id="form1" name="form1" method="post" action="">
            <div class="Manager_style add_info search_style">
                <ul class="search_content clearfix">
                    <li><label class="lf">应用名称</label>
                        <label>
                            <input name="name" ng-model="queryFilter.param.name" type="text"
                                   class="text_add"/>
                        </label>
                    </li>
                    <li>
                        <label class="lf">生效时间</label>
                        <label>
                            <input type="text" ng-model="queryFilter.param.activeAt" th:readonly="true"
                                   class="date eg-date"/>
                            <span class="date-icon"><i class="icon-calendar"></i></span>
                        </label>
                    </li>
                </ul>
                <ul class="search_content clearfix">
                    <button id="btn_search" ng-click="appVersionSearch = !appVersionSearch" type="button"
                            class="btn btn-primary queryBtn">查询
                    </button>
                    <button class="btn btn-primary addBtn" type="button" ng-click="add(0)"
                            id="Add_user_btn" shiro:hasPermission="/user/add">添加
                    </button>
                    <button type="button" class="btn btn-primary updateBtn" ng-click="add(1)"
                            shiro:hasPermission="/user/edit">修改
                    </button>
                    <button type="button" class="btn btn-primary deleteBtn" ng-click="delete()"
                            shiro:hasPermission="/user/delete">删除
                    </button>
                </ul>
            </div>
        </form>
        <div class="commonManager">
            <div class="data-list">
                <table id="data_list" cellpadding="0" cellspacing="0"
                       class="table table-striped table-bordered table-hover">
                    <thead>
                    <tr>
                        <th th:width="50">
                            <input name="dataCheckboxAll" id="data_checkbox_all" type="checkbox"
                                   ng-click="selectAll($event)" class="ace"/>
                            <span class="lbl" style="cursor:pointer;"></span>
                        </th>
                        <th>名称</th>
                        <th>标题</th>
                        <th>版本号</th>
                        <th th:width="250">版本内容</th>
                        <th>生效时间</th>
                        <th>状态</th>
                        <th>创建人</th>
                        <th>创建时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="record in data">
                        <td>
                            <input name="dataCheckbox{{$index}}" value="{{record.code}}" type="checkbox"
                                   class="ace data-checkbox"/>
                            <span class="lbl" style="cursor:pointer;"></span>
                        </td>
                        <td ng-bind="record.name"></td>
                        <td ng-bind="record.title"></td>
                        <td ng-bind="record.version"></td>
                        <td class="text-left" ng-bind-html="record.content | toContent"></td>
                        <td ng-bind="record.activeAt | date:'yyyy-MM-dd HH:mm:ss'"></td>
                        <td ng-bind-html="record.status | toStatus"></td>
                        <td ng-bind="record.createBy"></td>
                        <td ng-bind="record.createAt | date:'yyyy-MM-dd HH:mm:ss'"></td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="hupan_more eg-page" ng-init="" url="/appVersion/list" request-page-params="queryFilter"
                 click-search="appVersionSearch" return-page-rows="data"></div>
        </div>

        <div id="edit_panel" style="display:none">
            <form name="form" method="post" class="form-horizontal">
                <div class="win-content">
                    <div class="form-group">
                        <label class="col-lg-2 col-md-2 control-label">名称</label>
                        <div class="col-lg-8 col-md-8">
                            <input type="text" class="form-control" placeholder="名称" name="name"
                                   ng-model="record.name" ht-validate="{maxlength:100}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-2 col-md-2 control-label">标题</label>
                        <div class="col-lg-8 col-md-8">
                            <input type="text" class="form-control" placeholder="标题" name="title"
                                   ng-model="record.title" ht-validate="{maxlength:100}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-2 col-md-2 control-label">版本号</label>
                        <div class="col-lg-8 col-md-8">
                            <input type="text" class="form-control" placeholder="版本号" name="version"
                                   ng-model="record.version" ht-validate="{maxlength:100}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-2 col-md-2 control-label">版本内容</label>
                        <div class="col-lg-8 col-md-8">
                            <textarea class="form-control" name="content" ng-model="record.content" placeholder="版本内容"
                                      rows="3">
                            </textarea>
                        </div>
                        <div class="col-md-2">
                            <i style="color: #F60;">*</i>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="active_at" class="col-md-2 control-label">生效时间</label>
                        <!--data-date="1979-09-16T05:25:07Z"-->
                        <div class="input-group date form-datetime col-md-6" data-link-field="active_at">
                            <input class="form-control" size="16" type="text" value="" readonly="true"/>
                            <!--<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>-->
                            <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                        </div>
                        <input type="text" class="hidden" id="active_at" name="activeAt" ng-model="record.activeAt" value=""/><br/>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>